﻿// Date: 25.09.11

// Revision 2

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace NOVA
{
    /// <summary>
    /// Camera frame rates
    /// </summary>
    public enum FrameRate
    {
        _15Hz = 0,
        _30Hz = 1,
        _50Hz = 2,
        _60Hz = 3,
        _120Hz = 4,
        _240Hz = 5,
    }

    /// <summary>
    /// Resolution of the camera
    /// </summary>
    public enum Resolution
    {
        _160x120 = 0,
        _320x240 = 1,
        _640x480 = 2,
        _800x600 = 3,
        _1024x768 = 4,
        _1280x1024 = 5,
        _1600x1200 = 6,
    }

    /// <summary>
    /// The format of the image that will be passed to the marker tracker.
    /// </summary>
    public enum ImageFormat
    {
        /// <summary>
        /// 8-bit Grayscale format.
        /// </summary>
        GRAYSCALE_8 = 0,
        
        /// <summary>
        /// 16-bit RGB format. 5 bits for R, 6 bits for G, and 5 bits for B channel.
        /// </summary>
        R5G6B5_16 = 1,
        
        /// <summary>
        /// 24-bit RGB format. 8 bits for each R, G, and B channel.
        /// </summary>
        R8G8B8_24 = 2,

        /// <summary>
        /// 24-bit BGR format. 8 bits for each B, G, and R channel.
        /// </summary>    
        B8G8R8_24 = 3,        
        
        /// <summary>
        /// 32-bit ABGR format. 8 bits for each A (alpha), B, G, and R channel.
        /// </summary>     
        A8B8G8R8_32 = 4,
    
        /// <summary>
        /// 32-bit RGBA format. 8 bits for each R, G, B, and A (alpha) channel.
        /// </summary>    
        R8G8B8A8_32 = 5,
                
        /// <summary>
        /// 32-bit BGRA format. 8 bits for each B, G, R, and A (alpha) channel.
        /// </summary>             
        B8G8R8A8_32 = 6,
    }

    /// <summary>
    /// Struct including all camera settings needed for the marker tracking.
    /// </summary>
    public struct VideoCamera
    {
        /// <summary>
        /// Zero-based index of the camera to be used. Internal camera have a usually a smaller index than external ones.
        /// </summary>
        public int CameraID;

        /// <summary>
        /// Desired frame rate of the video camera. Note that, not every camera supports every frame rate.
        /// </summary>
        public FrameRate FrameRate;

        /// <summary>
        /// Desired resolution of the video camera. Note that, not every camera supports every resolution.
        /// </summary>
        public Resolution Resolution;

        /// <summary>
        /// The format of the image that will be passed to the marker tracker.
        /// </summary>
        public ImageFormat ImageFormat;

        /// <summary>
        /// Specifies if the image should be grayscale.
        /// </summary>
        public bool Grayscale;

        /// <summary>
        /// Path of the camera calibration file, which will be passed to the marker tracker.
        /// </summary>
        public string CalibrationFile;
    }

    /// <summary>
    /// Defines the different collision types of the model object.
    /// </summary>
    public enum CollisionType
    {
        /// <summary>
        /// Creates a convex hull for the model. Note, that this does 
        /// not support runtime scaling! Use the content processor scaling instead.
        /// </summary>
        ConvexHull = 0,

        /// <summary>
        /// Creates a collision mesh which exactly matches the graphical mesh.
        /// </summary>
        ExactMesh,

        /// <summary>
        /// Creates a collision mesh which represents the object's bounding sphere.
        /// </summary>
        BoundingSphere
    }
}
